package com.qffx.moviebase.adapter.find;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by lx on 2017/2/7.
 */

public class FindFragmentAdapter extends FragmentPagerAdapter {

    private List<Fragment> fragmentList;
    private String [] arr;
    public FindFragmentAdapter(FragmentManager fm,List<Fragment> fragmentList,String[] arr) {
        super(fm);
        this.arr=arr;
        this.fragmentList = fragmentList;
    }

    @Override
    public Fragment getItem(int position) {
        return fragmentList.get(position);
    }

    @Override
    public int getCount() {
        return fragmentList.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return arr[position];
    }
}
